﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Channels.Models {
    public class Channel {
        public int Id { get; set; }
        public string Title { get; set; }
        public string Url { get; set; }
        public bool Active { get; set; }
        public bool Public { get; set; }

        private List<ChannelItem> _ChannelItems = new List<ChannelItem>();
        public List<ChannelItem> ChannelItems {
            get {
                return _ChannelItems;
            }
            set {
                _ChannelItems = value;
            }
        }

        public Channel() { }
        public Channel(string title) {
            this.Title = title;
        }
    }

    public class ChannelItem {
        public int Id { get; set; }
        public int ChannelId { get; set; }
        public string Title { get; set; }
        public string Desc { get; set; }
        public string ImageUrl { get; set; }
        public string Link { get; set; }
        public DateTime AddedDate { get; set; }
    }

    public class UserChannelItem : ChannelItem {
        public bool IsRead { get; set; }

    }

    public class User {
        public string Email { get; set; }
        public string Password { get; set; }
        public bool Active { get; set; }
        public DateTime RegisteredDate { get; set; }
    }
}